<template>
  <div>
      <page-list
      url="/UserEnterprise/GetIsOrNoTaskList"
      :params="params"
      @initActive="_initActive"
      @initList="_initList"
      ref="PageTabList"
    >
    <div>
         <van-cell
        class="card"
        @click="detail(item)"
        v-for="(item, index) in list"
        :key="index"
      >
        <div>
          <div>
              <van-row gutter="20" class="dep_sort">
                <van-col span="24">
                  {{ item.CompanyName }}</van-col
                >
              </van-row>

            <!-- <van-row gutter="20">
              <van-col>
                <img
                  class="icon"
                  src="@/assets/Images/AppIcon/icon_list_enterprise.png"
                />企业名称：{{ item.CompanyName }}
              </van-col>
            </van-row> -->
           
            <van-row gutter="20">
              <van-col>
                <img
                  class="icon"
                  src="@/assets/Images/AppIcon/icon_danger_main_assign.png"
                />上次检查日期：{{ item.LastCheckDate }}
              </van-col>
            </van-row>

          </div>
        </div>
      </van-cell>
    </div>
    </page-list>
  </div>
</template>

<script>
import PageList from "./PageList.vue"

export default {

  components: { PageList },

  data() {
    
    return {
      rightValue: 0,
      list:[],
      params: 
        {
            IsOrNoHaveTask:false,
            StartDate:'',
            EndDate:'',
        },
    };
    
  },

  created() {
    var date = new Date();
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var day = date.getDate();
    var hour = date.getHours();
    var minute = date.getMinutes();
    var second = date.getSeconds();
    this.params.EndDate = (year + '-' + month+ '-' + day + ' ' + hour + ':' + minute + ':' + second);
    this.params.StartDate = (year + '-' + (month - 1) + '-' + day + ' ' + hour + ':' + minute + ':' + second);
  },

  methods: {
    _initActive(active) {
      this.active = active;
    },
    _initList(list) {
      this.list = list;
    },
    detail(item){
      this.$router.push("/BaseInfo?CompanyCode=" + item.CompanyCode);
    }

    },
};
</script>
<style lang="less" scoped>
.all_dep {
  background-color: #ffffff;
}

.warn_header {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 10px;
  .warn_tag {
    position: absolute;
    right: 0;
    top: 0;
    border-radius: 26.64rem 0 0 26.64rem;
  }
}
.dep_sort {
  font-size: 17px;
  // display: flex;
  // flex-wrap: wrap;
  // margin-bottom: 5px;
  img {
    height: 15px;
    width: 15px;
    margin-right: 5px;
  }
}
.dep_btm {
  display: flex;
  justify-content: flex-end;
  .btm_item {
    display: flex;
    align-items: center;
    img {
      height: 15px;
      width: 15px;
      margin-right: 5px;
    }
  }
}

</style>
